Skip to content

Commit

Permalink
Merge pull request #450 from chrispo-git/smashline-2
Browse files Browse the repository at this point in the history
Smashline 2
  • Loading branch information
chrispo-git committed Apr 18, 2024
2 parents 42073ef + c124a07 commit 52de66a
Show file tree
Hide file tree
Showing 534 changed files with 6,614 additions and 12,997 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ skyline = "0.2.0"
ninput = { git = "https://github.com/blu-dev/ninput", version = "0.1.0" }
skyline_smash = { git = "https://github.com/blu-dev/skyline-smash.git", features = ["weak_l2cvalue"] }
smash_script = { git = "https://github.com/blu-dev/smash-script.git", branch = "development" }
smashline = { git = "https://github.com/blu-dev/smashline.git", branch = "development" }
smashline = { git = "https://github.com/blu-dev/smashline-2" }
skyline-web = { git = "https://github.com/skyline-rs/skyline-web", optional = true }
param_config = { git = "https://github.com/csharpm7/lib_paramconfig.git"}
the_csk_collection_api = { git = "https://github.com/Coolsonickirby/the_csk_collection_api.git", branch = "nightly" }
bitflags = "1.3.2"
modular-bitfield = "0.11.2"
lazy_static = "1.4.0"
Expand Down
Binary file modified romfs/fighter/lucina/motion/body/c00/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c01/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c02/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c03/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c04/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c05/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c06/motion_list.bin
Binary file not shown.
Binary file modified romfs/fighter/lucina/motion/body/c07/motion_list.bin
Binary file not shown.
22 changes: 6 additions & 16 deletions src/bayonetta/acmd/aerials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
bayo_fair1,
bayo_fair2
);
Agent::new("bayonetta")
.acmd("game_attackairf", bayo_fair1)
.acmd("game_attackairf2", bayo_fair2)
.install();
}


#[acmd_script(
agent = "bayonetta",
script = "game_attackairf",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_fair1(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_fair1(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand Down Expand Up @@ -67,12 +62,7 @@ unsafe fn bayo_fair1(fighter: &mut L2CAgentBase) {
WorkModule::off_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING);
}
}
#[acmd_script(
agent = "bayonetta",
script = "game_attackairf2",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_fair2(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_fair2(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand Down
13 changes: 4 additions & 9 deletions src/bayonetta/acmd/ground.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
bayo_jab1
);
Agent::new("bayonetta")
.acmd("game_attack11", bayo_jab1)
.install();
}

#[acmd_script(
agent = "bayonetta",
script = "game_attack11",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_jab1(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_jab1(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand Down
22 changes: 6 additions & 16 deletions src/bayonetta/acmd/specials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
bayo_sideb,
bayo_sideb_start
);
Agent::new("bayonetta")
.acmd("game_specials", bayo_sideb_start)
.acmd("game_specialsholdend", bayo_sideb)
.install();
}

#[acmd_script(
agent = "bayonetta",
script = "game_specials",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_sideb_start(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_sideb_start(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand Down Expand Up @@ -67,12 +62,7 @@ unsafe fn bayo_sideb_start(fighter: &mut L2CAgentBase) {
frame(fighter.lua_state_agent, 40.0);
macros::FT_MOTION_RATE(fighter, /*FSM*/ 0.843);
}
#[acmd_script(
agent = "bayonetta",
script = "game_specialsholdend",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_sideb(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_sideb(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
macros::FT_MOTION_RATE(fighter, /*FSM*/ 0.5);
Expand Down
22 changes: 6 additions & 16 deletions src/bayonetta/acmd/tilts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,14 @@ use super::*;


pub fn install() {
smashline::install_acmd_scripts!(
bayo_dtilt,
bayo_utilt
);
Agent::new("bayonetta")
.acmd("game_attacklw3", bayo_dtilt)
.acmd("game_attackhi3", bayo_utilt)
.install();
}


#[acmd_script(
agent = "bayonetta",
script = "game_attacklw3",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_dtilt(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_dtilt(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand All @@ -46,12 +41,7 @@ unsafe fn bayo_dtilt(fighter: &mut L2CAgentBase) {
AttackModule::clear_all(fighter.module_accessor);
}
}
#[acmd_script(
agent = "bayonetta",
script = "game_attackhi3",
category = ACMD_GAME,
low_priority)]
unsafe fn bayo_utilt(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn bayo_utilt(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 1.0);
if macros::is_excute(fighter) {
Expand Down
9 changes: 4 additions & 5 deletions src/bayonetta/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_agent_frames!(
bayo_frame
);
Agent::new("bayonetta")
.on_line(Main, bayo_frame)
.install();
}


#[fighter_frame( agent = FIGHTER_KIND_BAYONETTA )]
fn bayo_frame(fighter: &mut L2CFighterCommon) {
unsafe extern "C" fn bayo_frame(fighter: &mut L2CFighterCommon) {
unsafe {
let boma = smash::app::sv_system::battle_object_module_accessor(fighter.lua_state_agent);
if is_default(boma) {
Expand Down
27 changes: 8 additions & 19 deletions src/brave/acmd/aerials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ use super::*;


pub fn install() {
smashline::install_acmd_scripts!(
hero_nair,
hero_bair,
hero_uair
);
Agent::new("brave")
.acmd("game_attackairn", hero_nair)
.acmd("game_attackairb", hero_bair)
.acmd("game_attackairhi", hero_uair)
.install();
}

#[acmd_script( agent = "brave", script = "game_attackairn", category = ACMD_GAME, low_priority )]
unsafe fn hero_nair(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_nair(fighter: &mut L2CAgentBase) {
frame(fighter.lua_state_agent, 3.0);
if macros::is_excute(fighter) {
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING);
Expand All @@ -44,12 +43,7 @@ unsafe fn hero_nair(fighter: &mut L2CAgentBase) {
WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING);
}
}
#[acmd_script(
agent = "brave",
script = "game_attackairb",
category = ACMD_GAME,
low_priority)]
unsafe fn hero_bair(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_bair(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 3.0);
macros::FT_MOTION_RATE(fighter, /*FSM*/ 0.5);
Expand All @@ -73,12 +67,7 @@ unsafe fn hero_bair(fighter: &mut L2CAgentBase) {
WorkModule::off_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING);
}
}
#[acmd_script(
agent = "brave",
script = "game_attackairhi",
category = ACMD_GAME,
low_priority)]
unsafe fn hero_uair(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_uair(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 3.0);
if macros::is_excute(fighter) {
Expand Down
28 changes: 8 additions & 20 deletions src/brave/acmd/ground.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,14 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
hero_jab1,
hero_jab2,
hero_dsmash
);
Agent::new("brave")
.acmd("game_attack11", hero_jab1)
.acmd("game_attack12", hero_jab2)
.acmd("game_attacklw4", hero_dsmash)
.install();
}


#[acmd_script(
agent = "brave",
script = "game_attack11",
category = ACMD_GAME,
low_priority)]
unsafe fn hero_jab1(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_jab1(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 6.0);
if macros::is_excute(fighter) {
Expand All @@ -53,12 +47,7 @@ unsafe fn hero_jab1(fighter: &mut L2CAgentBase) {
}
}

#[acmd_script(
agent = "brave",
script = "game_attack12",
category = ACMD_GAME,
low_priority)]
unsafe fn hero_jab2(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_jab2(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
frame(fighter.lua_state_agent, 6.0);
if macros::is_excute(fighter) {
Expand All @@ -81,8 +70,7 @@ unsafe fn hero_jab2(fighter: &mut L2CAgentBase) {
}
}

#[acmd_script( agent = "brave", script = "game_attacklw4", category = ACMD_GAME, low_priority )]
unsafe fn hero_dsmash(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_dsmash(fighter: &mut L2CAgentBase) {
frame(fighter.lua_state_agent, 3.0);
if macros::is_excute(fighter) {
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD);
Expand Down
17 changes: 9 additions & 8 deletions src/brave/acmd/specials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
hero_frizz,
hero_zap_spark
);
Agent::new("brave_fireball")
.acmd("game_specialn1", hero_frizz)
.install();

Agent::new("brave_spark")
.acmd("game_specials1", hero_zap_spark)
.install();
}


#[acmd_script( agent = "brave_fireball", script = "game_specialn1", category = ACMD_GAME, low_priority )]
unsafe fn hero_frizz(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_frizz(fighter: &mut L2CAgentBase) {
if macros::is_excute(fighter) {
macros::ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 72, 55, 0, 40, 2.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC);
AttackModule::enable_safe_pos(fighter.module_accessor);
Expand All @@ -33,8 +35,7 @@ unsafe fn hero_frizz(fighter: &mut L2CAgentBase) {
macros::ATK_POWER(fighter, 0, 6);
}
}
#[acmd_script( agent = "brave_spark", script = "game_specials1", category = ACMD_GAME, low_priority )]
unsafe fn hero_zap_spark(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_zap_spark(fighter: &mut L2CAgentBase) {
if macros::is_excute(fighter) {
macros::QUAKE(fighter, *CAMERA_QUAKE_KIND_S);
macros::ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 80, 75, 0, 65, 8.0, 0.0, 10.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC);
Expand Down
14 changes: 6 additions & 8 deletions src/brave/acmd/tilts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_acmd_scripts!(
hero_ftilt1,
hero_dtilt
);
Agent::new("brave")
.acmd("game_attacks3", hero_ftilt1)
.acmd("game_attacklw3", hero_dtilt)
.install();
}

#[acmd_script( agent = "brave", script = "game_attacks3", category = ACMD_GAME, low_priority )]
unsafe fn hero_ftilt1(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_ftilt1(fighter: &mut L2CAgentBase) {
frame(fighter.lua_state_agent, 1.0);
macros::FT_MOTION_RATE(fighter, 1.5);
frame(fighter.lua_state_agent, 5.0);
Expand Down Expand Up @@ -60,8 +59,7 @@ unsafe fn hero_ftilt1(fighter: &mut L2CAgentBase) {
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO);
}
}
#[acmd_script( agent = "brave", script = "game_attacklw3", category = ACMD_GAME, low_priority )]
unsafe fn hero_dtilt(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn hero_dtilt(fighter: &mut L2CAgentBase) {
frame(fighter.lua_state_agent, 5.0);
if macros::is_excute(fighter) {
FighterAreaModuleImpl::enable_fix_jostle_area(fighter.module_accessor, 4.0, 4.0);
Expand Down
7 changes: 4 additions & 3 deletions src/brave/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ use crate::util::*;
use super::*;

pub fn install() {
smashline::install_agent_frame_callbacks!(hero);
Agent::new("brave")
.on_line(Main, hero)
.install();
}

#[fighter_frame_callback]
pub fn hero(fighter : &mut L2CFighterCommon) {
unsafe extern "C" fn hero(fighter : &mut L2CFighterCommon) {
unsafe {
let boma = smash::app::sv_system::battle_object_module_accessor(fighter.lua_state_agent);
if is_default(boma) {
Expand Down

0 comments on commit 52de66a

Please sign in to comment.