-
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.
- Loading branch information
1 parent
b427a80
commit 3afd082
Showing
13 changed files
with
852 additions
and
884 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,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); | ||
} |
Oops, something went wrong.