Skip to content

Commit

Permalink
per slot eff init concept + adding missing trail recolors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaccob101 committed Mar 21, 2024
1 parent f8ea374 commit df0bb87
Show file tree
Hide file tree
Showing 4 changed files with 345 additions and 12 deletions.
52 changes: 48 additions & 4 deletions fighters/samusd/src/acmd/aerials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,18 @@ unsafe extern "C" fn samusd_attack_air_f_effect(fighter: &mut L2CAgentBase) {
frame(lua_state, 11.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true);
LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0005),//g
2 => Vector3f::new(1.25, 0.6, 2.5),//pur
3 => Vector3f::new(1.05, 0.8, 0.1),//r
4 => Vector3f::new(0.3, 1.0, 3.0),//y
5 => Vector3f::new(1.5, 0.1, 0.15),//w
6 => Vector3f::new(1.05, 0.8, 0.1), //blac
7 => Vector3f::new(0.8, 0.6, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
LAST_EFFECT_SET_RATE(fighter, 1.5);
}
}
Expand Down Expand Up @@ -286,7 +297,18 @@ unsafe extern "C" fn samusd_attack_air_b_effect(fighter: &mut L2CAgentBase) {
frame(lua_state, 8.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true);
LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
LAST_EFFECT_SET_RATE(fighter, 1.2);
}
frame(lua_state, 10.0);
Expand Down Expand Up @@ -333,7 +355,18 @@ unsafe extern "C" fn samusd_attack_air_hi_effect(fighter: &mut L2CAgentBase) {
frame(lua_state, 6.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true);
LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
}

Expand Down Expand Up @@ -408,7 +441,18 @@ unsafe extern "C" fn samusd_attack_air_lw_effect(fighter: &mut L2CAgentBase) {
frame(lua_state, 18.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true);
LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.5, 0.5, 3.0),//nor
1 => Vector3f::new(0.8, 0.5, 0.0),//g
2 => Vector3f::new(2.0, 0.3, 2.5),//pur
3 => Vector3f::new(2.5, 0.85, 0.0),//r
4 => Vector3f::new(0.5, 0.5, 2.5),//y
5 => Vector3f::new(3.0, 0.07, 0.15),//w
6 => Vector3f::new(2.0, 0.42, 0.0), //blac
7 => Vector3f::new(0.8, 0.2, 2.5),//pi
_ => Vector3f::new(0.5, 0.5, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
LAST_EFFECT_SET_RATE(fighter, 1.1);
}

Expand Down
43 changes: 42 additions & 1 deletion fighters/samusd/src/acmd/ground.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ unsafe extern "C" fn samusd_attack_11_game(fighter: &mut L2CAgentBase) {

}

unsafe extern "C" fn samusd_attack_11_effect(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
if is_excute(fighter) {
FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
}
frame(lua_state, 2.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.95, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
frame(lua_state, 3.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 10, 15, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true);
}
}

unsafe extern "C" fn samusd_attack_12_game(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
Expand Down Expand Up @@ -52,7 +80,18 @@ unsafe extern "C" fn samusd_attack_12_effect(fighter: &mut L2CAgentBase) {
frame(lua_state, 6.0);
if is_excute(fighter) {
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 12, 3, -17, -22, -81, 1.25, true);
LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
}

Expand Down Expand Up @@ -103,12 +142,14 @@ unsafe extern "C" fn samusd_attack_dash_effect(fighter: &mut L2CAgentBase) {
LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true);
EFFECT_FOLLOW(fighter, Hash40::new("samusd_dash_attack"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, true);
LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0);
LAST_EFFECT_SET_ALPHA(fighter, 0.5);
}
}

pub fn install() {
smashline::Agent::new("samusd")
.acmd("game_attack11", samusd_attack_11_game)
.acmd("effect_attack11", samusd_attack_11_effect)
.acmd("game_attack12", samusd_attack_12_game)
.acmd("effect_attack12", samusd_attack_12_effect)
.acmd("expression_attack12", samusd_attack_12_expression)
Expand Down
193 changes: 193 additions & 0 deletions fighters/samusd/src/acmd/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,206 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn effect_slipattack(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 17.0);
if is_excute(fighter) {
LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
}
frame(lua_state, 18.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3.5, 8, -168, 180, 0, 1.05, 0, 0, 0, 0, 0, 0, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
frame(lua_state, 33.0);
if is_excute(fighter) {
LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
}
frame(lua_state, 34.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, -3.5, -166, 14, 3, 1.05, 0, 0, 0, 0, 0, 0, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
}

unsafe extern "C" fn effect_cliffattack(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 14.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true);
}
frame(lua_state, 24.0);
if is_excute(fighter) {
LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 5.5, 0, 0, 6, -12, 1.1, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
}

unsafe extern "C" fn effect_catchattack(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 6, 17.5, -3, 15, -20, 0, 1.1, 0, 0, 0, 0, 0, 0, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
LAST_EFFECT_SET_RATE(fighter, 1.5);
}
}

unsafe extern "C" fn effect_downattackd(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 15.0);
if is_excute(fighter) {
LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
}
frame(lua_state, 7.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 0, 180, 180, 10, 1.5, 0, 0, 0, 0, 0, 0, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
frame(lua_state, 22.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 0, 180, 0, 10, 1.5, 0, 0, 0, 0, 0, 0, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
}

unsafe extern "C" fn effect_downattacku(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 16.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 4, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true);
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, 3, 0, 0, 0, 0.95, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
frame(lua_state, 17.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 6, 20, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true);
}
frame(lua_state, 18.0);
if is_excute(fighter) {
LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true);
}
frame(lua_state, 21.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, -4, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, true);
EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, -3, 0, 180, 0, 0.95, true);
let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) {
0 => Vector3f::new(0.1, 0.7, 3.0),//nor
1 => Vector3f::new(0.55, 0.88, 0.0004),//g
2 => Vector3f::new(1.25, 0.55, 1.5),//pur
3 => Vector3f::new(0.84, 0.7, 0.03),//r
4 => Vector3f::new(0.1, 1.0, 2.0),//y
5 => Vector3f::new(0.9, 0.03, 0.03),//w
6 => Vector3f::new(1.15, 0.65, 0.03),//blac
7 => Vector3f::new(0.78, 0.5, 2.5),//pi
_ => Vector3f::new(0.1, 0.7, 3.0)
}; //matches glow color
LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z);
}
frame(lua_state, 22.0);
if is_excute(fighter) {
EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 6, -20, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true);
}
frame(lua_state, 23.0);
if is_excute(fighter) {
FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 5, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true);
}
}

pub fn install() {
smashline::Agent::new("samusd")
.acmd("game_dash", dash_game)
.acmd("sound_dash", dash_sound)
.acmd("game_turndash", turn_dash_game)
.acmd("game_escapeair", escape_air_game)
.acmd("game_escapeairslide", escape_air_slide_game)
.acmd("effect_slipattack", effect_slipattack)
.acmd("effect_cliffattack", effect_cliffattack)
.acmd("effect_catchattack", effect_catchattack)
.acmd("effect_downattackd", effect_downattackd)
.acmd("effect_downattacku", effect_downattacku)
.install();
smashline::Agent::new("samusd_cshot")
.acmd("game_shoot", samusd_cshot_shoot_game)
Expand Down
Loading

0 comments on commit df0bb87

Please sign in to comment.