-
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
Showing
20 changed files
with
931 additions
and
1,000 deletions.
There are no files selected for viewing
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
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,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); | ||
} |
Oops, something went wrong.