-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i don't like dancing blade
- Loading branch information
Showing
13 changed files
with
845 additions
and
1,418 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
Oops, something went wrong.