diff --git a/dynamic/src/consts.rs b/dynamic/src/consts.rs index ab0b67d53b..dab357922d 100644 --- a/dynamic/src/consts.rs +++ b/dynamic/src/consts.rs @@ -1831,6 +1831,7 @@ pub mod vars { // flags pub const ATTACK_AIR_LW_REBOUND: i32 = 0x1100; pub const SPECIAL_LW_ENABLE_MANUAL_FOOTSTOOL: i32 = 0x1101; + pub const YOURE_MINE: i32 = 0x1102; } } diff --git a/fighters/szerosuit/src/acmd/smashes.rs b/fighters/szerosuit/src/acmd/smashes.rs index 7eff766a18..65e5caa541 100644 --- a/fighters/szerosuit/src/acmd/smashes.rs +++ b/fighters/szerosuit/src/acmd/smashes.rs @@ -130,12 +130,43 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 90, 0, 0, 4.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 10, 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_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 85, 0, 0, 7.0, 0.0, 3.0, 17.0, Some(0.0), Some(3.0), Some(10.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, 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); } + frame(lua_state, 20.0); // Down Smash taunt input + if is_excute(agent) { + if agent.is_motion(Hash40::new("attack_lw4")) && (20..24).contains(&(agent.motion_frame() as u32)) { + if !VarModule::is_flag(agent.object(), vars::szerosuit::status::YOURE_MINE) && agent.is_button_on(Buttons::AppealAll) && AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { + PLAY_SE(agent, Hash40::new("vc_szerosuit_appeal03")); + VarModule::on_flag(agent.object(), vars::szerosuit::status::YOURE_MINE); + } + } + } wait(lua_state, 5.0); if is_excute(agent) { AttackModule::clear_all(boma); } } +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_03")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_szerosuit_smash_l01")); + } +} + +unsafe extern "C" fn sound_attacklw4charge(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_smash_start_03")); + } +} + pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4, Priority::Low); agent.acmd("game_attacks4hi", game_attacks4, Priority::Low); @@ -144,4 +175,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackhi4", game_attackhi4, Priority::Low); agent.acmd("game_attacklw4", game_attacklw4, Priority::Low); + agent.acmd("sound_attacklw4", sound_attacklw4, Priority::Low); + agent.acmd("sound_attacklw4", sound_attacklw4charge, Priority::Low); } \ No newline at end of file