Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grab Sweep #2319

Merged
merged 11 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions fighters/bayonetta/src/acmd/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,6 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn bayonetta_catch_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 6.0);
if is_excute(fighter) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 7.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(10.2), *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 dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -679,7 +659,6 @@ pub fn install() {
.acmd("sound_damageflyn", damageflyn_sound)
.acmd("sound_damageflyroll", damageflyroll_sound)
.acmd("sound_damageflytop", damageflytop_sound)
.acmd("game_catch", bayonetta_catch_game)
.acmd("game_dash", dash_game)
.acmd("sound_dash", dash_sound)
.acmd("game_turndash", turn_dash_game)
Expand Down
63 changes: 63 additions & 0 deletions fighters/bayonetta/src/acmd/throws.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
use super::*;

unsafe extern "C" fn bayonetta_catch_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 6.0);
if is_excute(fighter) {
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);
}
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 bayonetta_catch_dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 9.0);
if is_excute(fighter) {
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);
}
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 bayonetta_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(agent) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 11.0);
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(-15.1), *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 bayonetta_throw_f_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -79,6 +139,9 @@ unsafe extern "C" fn bayonetta_throw_lw_game(fighter: &mut L2CAgentBase) {

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)
Expand Down
48 changes: 0 additions & 48 deletions fighters/brave/src/acmd/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,52 +116,6 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn brave_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);
}
frame(lua_state, 5.0);
if is_excute(fighter) {
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, 7.0, 0.0, Some(0.0), Some(7.0), Some(7.0), *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 brave_catch_dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 8.0);
if is_excute(fighter) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 9.0);
if is_excute(fighter) {
CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(10.0), *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 dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -574,8 +528,6 @@ pub fn install() {
.acmd("sound_damageflyn", damageflyn_sound)
.acmd("sound_damageflyroll", damageflyroll_sound)
.acmd("sound_damageflytop", damageflytop_sound)
.acmd("game_catch", brave_catch_game)
.acmd("game_catchdash", brave_catch_dash_game)
.acmd("game_dash", dash_game)
.acmd("sound_dash", dash_sound)
.acmd("game_turndash", turn_dash_game)
Expand Down
67 changes: 67 additions & 0 deletions fighters/brave/src/acmd/throws.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
use super::*;

unsafe extern "C" fn brave_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);
if is_excute(fighter) {
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);
}
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 brave_catch_dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 8.0);
if is_excute(fighter) {
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);
}
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 brave_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(agent) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 10.0);
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(-12.7), *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 brave_throw_f_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -92,6 +156,9 @@ unsafe extern "C" fn brave_throw_lw_game(fighter: &mut L2CAgentBase) {

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)
Expand Down
21 changes: 0 additions & 21 deletions fighters/buddy/src/acmd/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,6 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn buddy_catch_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 6.0);
if is_excute(fighter) {
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)
}
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 dash_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -308,7 +288,6 @@ pub fn install() {
.acmd("sound_damageflyn", damageflyn_sound)
.acmd("sound_damageflyroll", damageflyroll_sound)
.acmd("sound_damageflytop", damageflytop_sound)
.acmd("game_catch", buddy_catch_game)
.acmd("game_turn", dash_game)
.acmd("sound_dash", dash_sound)
.acmd("game_turndash", turn_dash_game)
Expand Down
63 changes: 63 additions & 0 deletions fighters/buddy/src/acmd/throws.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
use super::*;

unsafe extern "C" fn buddy_catch_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 6.0);
if is_excute(fighter) {
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);
}
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 buddy_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(agent) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 10.0);
if is_excute(agent) {
CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(11.0), *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 buddy_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(agent) {
GrabModule::set_rebound(boma, true);
}
frame(lua_state, 11.0);
if is_excute(agent) {
CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.9), *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 buddy_throw_f_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -148,6 +208,9 @@ unsafe extern "C" fn buddy_throw_lw_sound(fighter: &mut L2CAgentBase) {

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)
Expand Down
Loading
Loading